<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript" src="jslib/jquery-1.8.0.min.js"></script>
</head>
<body>
<img id="imgId" alt="图片" src="images/img/b10a5f0c-0bf7-47d8-9251-cfcb95a4425a.jpg" /><br/><br/>
<img id="imgId2" alt="图片" src="images/img/b10a5f0c-0bf7-47d8-9251-cfcb95a4425a.jpg" />
<script type="text/javascript">

	var theImage = new Image();
	theImage.src = $("#imgId").attr("src");
	var nowImageWidth = Math.round(theImage.width/(theImage.height/100));
	$("#imgId").attr({
		width : 100,
		heigth : nowImageHeigth
	});
	
	var imgs = $('img[name=imgName]');
	for(var i = 0; i < imgs.length; i++) {
		break;
		console.info(imgs[i]);
		var theImage = new Image();
		theImage.src = $(imgs[i]).attr("src");
		var nowImageWidth = Math.round(theImage.width/(theImage.height/100));
		$(imgs[i]).attr({
			width : nowImageWidth,
			heigth : 100
		});
	}
</script>
</body>
</html>